package de.baumann.browser.present.gg

import de.baumann.browser.api.OdinObserver
import de.baumann.browser.api.net.vo.gg.Smelter
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.gg.ISmeltersView
import de.baumann.browser.model.rank

class SmeltersPresenter : BasePresenter<ISmeltersView>() {
    fun smelteryRank() {
        rank().subscribe(object : OdinObserver<List<Smelter>>(view) {
            override fun onSuccess(data: List<Smelter>?) {
                if (data == null) {
                    return
                }
                view?.setSmelters(data)
            }
        })
    }
}